﻿using System.Collections.ObjectModel;
using System.Windows.Input;
using System.Data.Linq.Mapping;

namespace BotModels
{
    [Table]
    public class Bot : ModelBase
    {
        public ICommand ChatWithBotCommand { get; set; }

        public const string IdPropertyName = "Id";
        private string id;
        [Column(IsPrimaryKey = true)]
        public string Id
        {
            get { return id; }
            set
            {
                if (id == value)
                {
                    return;
                }

                id = value;
                RaisePropertyChanged("Id");
            }
        }

        public const string NamePropertyName = "Name";
        private string name;
        [Column(CanBeNull = false)]
        public string Name
        {
            get { return name; }
            set
            {
                if (name == value)
                {
                    return;
                }

                name = value;
                RaisePropertyChanged("Name");
            }
        }
    }
}
